/*
 *  listener.h
 *  Untitled
 *
 *  Created by Ben Nolan on 3/11/08.
 *  Copyright 2008 __MyCompanyName__. All rights reserved.
 *
 */

#pragma once

#include "xml_connection.h"
#include "axis_aligned_box.h"

namespace Wonderland{

	class ServerRegion;
	class Node;

	class Listener : public XmlConnection{
	public:
		Listener(boost::asio::io_service& io, ServerRegion* region);
		
		virtual void onMessage(Message&);
		virtual void onConnected();
		virtual void onDisconnected();
		
		bool interestedIn(const Node);
		std::vector<Node *> getVisibleNodes();
	private:
		Wonderland::ServerRegion* region_;
		AxisAlignedBox interestBox_;
	};

}

